<?php

namespace App\Http\Requests\Admin\GouponController;

use App\Http\Requests\BaseRequest;
use Illuminate\Foundation\Http\FormRequest;

class doRule extends BaseRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'store_id'=>'required',
            'coupon_title'=>'required',
            'coupon_value'=>'required',
            'is_expiration'=>'required',
            'is_opend'=>'required',
            'max_number'=>'required',
        ];
    }

    public function messages()
    {
        return [
            'store_id.required' => '請選擇門店!',
            'coupon_title.required' => '請填寫優惠卷標題!',
            'coupon_value.required' => '請填寫優惠卷價值!',
            'is_expiration.required' => '請選擇是否驗證過期!',
            'is_opend.required' => '勾選開放操作!',
            'max_number.required' => '請填寫領取數!',
        ];
    }
}
